package com.ngkj.zmfptback.sys.controller;

import com.ngkj.zmfptCommon.common.bean.CommonReslut;
import com.ngkj.zmfptCommon.common.util.ResultEnum;
import com.ngkj.zmfptback.sys.bean.AuthorityEntity;
import com.ngkj.zmfptback.sys.service.read.AuthReadService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ChenHN
 * @since 2021/12/22 creation
 **/
@RestController
@RequestMapping("/auth")
public class AuthController {

    @Resource
    private AuthReadService authReadService;

    @GetMapping("/getAuthList")
    public CommonReslut getAuthList(){
        List<AuthorityEntity> authList = authReadService.getAuthList();
        return new CommonReslut(ResultEnum.ok,authList);
    }

}
